#include <stdio.h>
#include <stdlib.h>

#define MAX_SIZE 50		// 线性表的最大长度
#define ElemType int    // 元素存储类型
#define bool int
#define true !0
#define false 0

typedef struct {
	ElemType data[MAX_SIZE];
	int length;			// 顺序表当前长度
} SqList;

void Merge(SqList& L1, SqList& L2, SqList& L)
{
	if(L.maxSize < L1.length + L2.length) return false;	//长度不够
	int i=0, j=0, k=0;
	while(i < L1.length && j < L2.length)
	{
		if(L1.data[i] <= L2.data[j]) L.data[k++]=L1.data[i++];
		else L.data[k++]=L2.data[j++];
	}
	
	while(i < L1.length) L.data[k++] = L1.data[i++];
	while(j < L2.length) L.data[k++] = L2.data[j++];
}
